Txn

interface Txn

Inheritors

Properties

Link copied to clipboard
abstract val account: Account

The account associated with this transaction.

Link copied to clipboard
abstract val checkNumAsInt: Int

Get the check number as an integer (returns 0 if it's not an integer)

Link copied to clipboard
abstract val checkNumber: String

Get the checknumber associated with this transaction.

Link copied to clipboard

The status associated with this transaction.

Link copied to clipboard

Returns the value of the Txn in terms of a non-security currency. For example, if this is for the security split of an investment transaction, then it will return the value of the buy/sell/short/cover in terms of the investment account's currency instead of the number of shares.

Link copied to clipboard
abstract val dateEntered: Long

Get the date that this transaction was entered.

Link copied to clipboard
abstract val dateInt: Int

Get the date of this transaction

Link copied to clipboard
abstract val description: String

The description associated with this transaction.

Link copied to clipboard

The amount of the transaction in a different currency than that of this transaction's account. This might be the original currency from a reminder, the downloaded form of this transaction, or possibly an amount entered using a UI that performed automatic currency conversion.

Link copied to clipboard
abstract var isNew: Boolean

Whether this transaction should be considered "unread" since having been downloaded

Link copied to clipboard
abstract val keywords: List<String>

Get the list of tags or keywords associated with this transaction

Link copied to clipboard
abstract val otherKeywords: List<String>

Get the list of tags or keywords associated with the other side of this transaction

Link copied to clipboard
abstract val otherSideAccount: Account?

Returns the account to which the other side of this transaction is assigned

Link copied to clipboard
abstract val otherTxnCount: Int

Get the number of transactions from the "other side" of this transaction. For splits, this will always be 1. For ParentTxns, this will be the number of splits.

Link copied to clipboard

Return a data class with the currency and value of the other side of this Txn

Link copied to clipboard
abstract val parentTxn: ParentTxn
Link copied to clipboard
abstract var status: Byte

The status associated with this transaction.

Link copied to clipboard
abstract val statusChar: Char

Get a character that indicates the status of this transaction

Link copied to clipboard
abstract val taxDateInt: Int

Get the date of this transaction for tax purposes.

Link copied to clipboard
abstract val transferType: String?

Get the type of transaction. Usually only used in the investment register to differentiate between buy, sell, and stock split transactions.

Link copied to clipboard
abstract val txnValue: CurrencyAmount

Return a data class with the currency and value of this Txn

Link copied to clipboard
abstract val value: Long

Get the value of this transaction, in the currency assigned to the account for this transaction.

Functions

Link copied to clipboard
abstract fun getOtherTxn(i: Int): AbstractTxn?

Get the transaction that makes up the other side of this transaction at the specified index. For SplitTxns, this index should always be 0 because there is only one "other transaction". for ParentTxns, this will return the split at the specified index.

Link copied to clipboard
abstract fun getParameter(parameterName: String): String?

Get the value associated with the given key (if any) in this transaction's set of tags.

abstract fun getParameter(parameterName: String, defaultStr: String?): String?

Get the value associated with the given key in this transactions set of tags. If there is no value associated with the given key, return the given default value.

Link copied to clipboard
abstract fun isTransferTo(acct: Account?): Boolean

Check whether this transaction includes a transfer to the given account.